package com.gong.datareceive;

import com.gong.datareceive.controller.Main;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@EnableAsync
public class DatareceiveApplication implements CommandLineRunner {

    @Autowired
    Main main;

    public static void main(String[] args) {
        SpringApplication.run(DatareceiveApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        main.recive();
    }
}
